package hnlg.com.cn.systemmanage.quyumanage.junit;

import javax.annotation.Resource;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import hnlg.com.cn.model.QuyuVo;
import hnlg.com.cn.systemmanage.quyumanage.service.IQuyuService;

@SpringBootTest
@RunWith(SpringRunner.class)
public class QuyuServiceImplTest {
@Resource IQuyuService QuyuService;
	@Test
	public void testAddQuyu() throws Exception {
		QuyuVo vo=new QuyuVo();
		vo.setName("鲁迅区");
		QuyuService.addQuyu(vo);
	}

	@Test
	public void testDeleteQuyu() throws Exception {
		QuyuService.deleteQuyu("1");
	}

	@Test
	public void testUpdateQuyu() throws Exception {
		QuyuVo vo=new QuyuVo();
		vo.setName("中山区");
		vo.setId("2");
		QuyuService.updateQuyu(vo);
	}
   @Test
   public void testQueryQuyu() throws Exception{
	   QuyuVo vo=new QuyuVo();
	   QuyuService.queryquyu(vo);
   }
   @Test
   public void testDeleteBatch()throws Exception{
	   String arr[]={"2","3"};
	   boolean flag=QuyuService.deletebatch(arr);
	   System.out.println("flag=="+flag);
   }
}
